﻿@model ChurchDiary.TableEntity.EntityLabels
<script src="~/Scripts/ChurchControllers/ChurchMembersController.js"></script>
<div class="row" ng-controller="ChurchMembersController">
    <div class="search-bar collapsed">
        <div class="form-group">
            <div class="input-group input-group-lg">
                <input type="text" class="form-control" placeholder="Type to search..." ng-model="search" ng-change="filter()">
                <span class="input-group-btn">
                    <button class="btn btn-square btn-lg btn-default no-shadow close-search-bar" type="button"><i class="zmdi zmdi-close"></i></button>
                </span>
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="bg-white bs-0 mb-20 widget">
            <ul class="nav nav-pills bg-black bs-inset-primary" role="tablist">
                <li role="presentation" class="pt-15 pb-15 pl-10 pr-20 mb-0">
                    <h3 class="fs-16 lh-1 m-0 text-white text-uppercase">@Html.LabelFor(m => m.FamilyMemberList)</h3>
                </li>
            </ul>
            <div class="widget-body">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-bordered">
                            <thead>
                                <tr>
                                    <th>@Html.LabelFor(m => m.Name)&nbsp;<a ng-click="sort_by('family.Name');"><i class="glyphicon glyphicon-sort"></i></a></th>
                                    <th>@Html.LabelFor(m => m.FamilyName)&nbsp;<a ng-click="sort_by('family.Name');"><i class="glyphicon glyphicon-sort"></i></a></th>
                                    <th>@Html.LabelFor(m => m.Email)&nbsp;<a ng-click="sort_by('family.Name');"><i class="glyphicon glyphicon-sort"></i></a></th>
                                    <th>@Html.LabelFor(m => m.Phone)&nbsp;<a ng-click="sort_by('family.Name');"><i class="glyphicon glyphicon-sort"></i></a></th>
                                    <th>@Html.LabelFor(m => m.DateOfBirth)&nbsp;<a ng-click="sort_by('family.Email');"><i class="glyphicon glyphicon-sort"></i></a></th>
                                    <th>@Html.LabelFor(m => m.Action)&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="data in filtered = (list | filter:search | orderBy : predicate :reverse) | startFrom:(currentPage-1)*entryLimit | limitTo:entryLimit">
                                    <td>{{data.Name}}</td>
                                    <td>{{data.Members.FamilyName}}</td>
                                    <td>{{data.Email}}</td>
                                    <td>{{data.Phone}}</td>
                                    <td>{{data.DateOfBirth}}</td>
                                    <td>
                                        <div class="btn-group-sm" role="group" aria-label="Second group">
                                            <button type="button" class="btn btn-info waves-effect" ng-click="toggle(data);"><i class="fa fa-eye"></i></button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="col-md-12" ng-show="filteredItems == 0">
                        <div class="col-md-12" style="text-align: center;">
                            <h4>@Html.LabelFor(c => c.NoData)</h4>
                        </div>
                    </div>
                </div>
                <div ng-show="filteredItems > 0" style="padding-right: 10px; text-align: right;">
                    <div pagination="" page="currentPage" max-size="10" on-select-page="setPage(page)" boundary-links="true" total-items="filteredItems" items-per-page="entryLimit" class="pagination-small" previous-text="«" next-text="»"></div>
                </div>
            </div>
        </div>
    </div>


    <div class="modal fade bs-example-modal-panel" tabindex="-1" id="FamilyMember" role="dialog" aria-labelledby="myPanelModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header bg-primary">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myAnimationModalLabel">{{title}}</h4>
                </div>
                <div class="modal-body">
                    <table class="table table-striped table-bordered">
                        <tr>
                            <th colspan="3">Personal Details</th>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Name)</td>
                            <td>:</td>
                            <td>{{family.Name}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Phone)</td>
                            <td>:</td>
                            <td>{{family.Phone}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Email)</td>
                            <td>:</td>
                            <td>{{family.Email}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Gender)</td>
                            <td>:</td>
                            <td>{{family.Gender}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfBirth)</td>
                            <td>:</td>
                            <td>{{family.DateOfBirth}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfChildDedication)</td>
                            <td>:</td>
                            <td>{{family.DateOfDedication}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfBaptism)</td>
                            <td>:</td>
                            <td>{{family.DateOfBaptism}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfSalvation)</td>
                            <td>:</td>
                            <td>{{family.DateOfSalvation}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfHgBaptism)</td>
                            <td>:</td>
                            <td>{{family.DateOfHgBaptism}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfLeaving)</td>
                            <td>:</td>
                            <td>{{family.DateOfLeaving}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfMarriage)</td>
                            <td>:</td>
                            <td>{{family.DateOfMarriage}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.ReasonOfLeaving)</td>
                            <td>:</td>
                            <td>{{family.ReasonOfLeaving}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Remarks)</td>
                            <td>:</td>
                            <td>{{family.Remarks}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.DateOfBaptism)</td>
                            <td>:</td>
                            <td>{{family.DateOfBaptism}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.RelationShip)</td>
                            <td>:</td>
                            <td>{{family.RelationShip.RelationShipName}}</td>
                        </tr>
                        <tr>
                            <th colspan="3">Family Details</th>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.FamilyName)</td>
                            <td>:</td>
                            <td>{{family.Members.FamilyName}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.FamilyNo)</td>
                            <td>:</td>
                            <td>{{family.Members.FamilyNo}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.ApplicantName)</td>
                            <td>:</td>
                            <td>{{family.Members.ApplicantName}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.ApplicationDate)</td>
                            <td>:</td>
                            <td>{{family.Members.ApplicationDate}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.ApplicationPlace)</td>
                            <td>:</td>
                            <td>{{family.Members.ApplicationPlace}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.FamilyName)</td>
                            <td>:</td>
                            <td>{{family.Members.FamilyName}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Email)</td>
                            <td>:</td>
                            <td>{{family.Members.Email}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.SameAddress)</td>
                            <td>:</td>
                            <td>{{family.Members.IsSameAddress}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Occupation)</td>
                            <td>:</td>
                            <td>{{family.Members.Occupation}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PermanentAddress)</td>
                            <td>:</td>
                            <td>{{family.Members.PermanentAddress}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PermanentCity)</td>
                            <td>:</td>
                            <td>{{family.Members.PermanentCity}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.Pincode)</td>
                            <td>:</td>
                            <td>{{family.Members.PermanentPincode}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PlaceAndChurch)</td>
                            <td>:</td>
                            <td>{{family.Members.PlaceAndChurch}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PlaceOfChurch)</td>
                            <td>:</td>
                            <td>{{family.Members.PlaceOfChurch}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PresentAddress)</td>
                            <td>:</td>
                            <td>{{family.Members.PresentAddress}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PresentCity)</td>
                            <td>:</td>
                            <td>{{family.Members.PresentCity}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.PreviousChurch)</td>
                            <td>:</td>
                            <td>{{family.Members.PreviousChurch}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.ReasonforSelecting)</td>
                            <td>:</td>
                            <td>{{family.Members.ReasonforSelecting}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.SinceWhen)</td>
                            <td>:</td>
                            <td>{{family.Members.SinceWhen}}</td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.SoftCopy)</td>
                            <td>:</td>
                            <td><a href="../../uploads/Documents/Membershipforms/{{family.Members.SoftCopy}}" target="_blank">Click to View</a></td>
                        </tr>
                        <tr>
                            <td>@Html.LabelFor(m => m.TelephoneNo)</td>
                            <td>:</td>
                            <td>{{family.Members.TelephoneNo}}</td>
                        </tr>
                    </table>


                    
                </div>
                <div class="modal-footer">
                        <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                    </div>
            </div>

        </div>
    </div>
</div>
